package com.topcoder.service.studio.contest;

import java.io.Serializable;

/**
 * Represents the ContestGeneralInfo entity. It holds the attributes contest
 * general info id,goals,target audience,branding guidelines,etc. It's mutable
 * and not thread safe.
 * 
 * @author xp
 * 
 */
public class ContestGeneralInfo implements Serializable {

    /**
     * Generated serial version id.
     */
    private static final long serialVersionUID = -780040836076505456L;

    /**
     * Represents the contest general info id attribute of the
     * ContestGeneralInfo entity. It's set and accessed in the set/get methods.
     * It can be any value. The default value is null.
     */
    private Long contestGeneralInfoId;

    /**
     * Represents the goals attribute of the ContestGeneralInfo entity. It's set
     * and accessed in the set/get methods. It can be any value. The default
     * value is null.
     */
    private String goals;

    /**
     * Represents the target audience attribute of the ContestGeneralInfo
     * entity. It's set and accessed in the set/get methods. It can be any
     * value. The default value is null.
     */
    private String targetAudience;

    /**
     * Represents the branding guidelines attribute of the ContestGeneralInfo
     * entity. It's set and accessed in the set/get methods. It can be any
     * value. The default value is null.
     */
    private String brandingGuidelines;

    /**
     * Represents the disliked designs websites attribute of the
     * ContestGeneralInfo entity. It's set and accessed in the set/get methods.
     * It can be any value. The default value is null.
     */
    private String dislikedSesignsWebsites;

    /**
     * Represents the other instructions attribute of the ContestGeneralInfo
     * entity. It's set and accessed in the set/get methods. It can be any
     * value. The default value is null.
     */
    private String otherInstructions;

    /**
     * Represents the winning criteria attribute of the ContestGeneralInfo
     * entity. It's set and accessed in the set/get methods. It can be any
     * value. The default value is null.
     */
    private String winningCriteria;

    /**
     * Default constructor.
     */
    public ContestGeneralInfo() {
    }

    /**
     * Returns the contestGeneralInfoId.
     * 
     * @return the contestGeneralInfoId.
     */
    public Long getContestGeneralInfoId() {
        return contestGeneralInfoId;
    }

    /**
     * Updates the contestGeneralInfoId with the specified value.
     * 
     * @param contestGeneralInfoId
     *            the contestGeneralInfoId to set.
     */
    public void setContestGeneralInfoId(Long contestGeneralInfoId) {
        this.contestGeneralInfoId = contestGeneralInfoId;
    }

    /**
     * Returns the goals.
     * 
     * @return the goals.
     */
    public String getGoals() {
        return goals;
    }

    /**
     * Updates the goals with the specified value.
     * 
     * @param goals
     *            the goals to set.
     */
    public void setGoals(String goals) {
        this.goals = goals;
    }

    /**
     * Returns the targetAudience.
     * 
     * @return the targetAudience.
     */
    public String getTargetAudience() {
        return targetAudience;
    }

    /**
     * Updates the targetAudience with the specified value.
     * 
     * @param targetAudience
     *            the targetAudience to set.
     */
    public void setTargetAudience(String targetAudience) {
        this.targetAudience = targetAudience;
    }

    /**
     * Returns the brandingGuidelines.
     * 
     * @return the brandingGuidelines.
     */
    public String getBrandingGuidelines() {
        return brandingGuidelines;
    }

    /**
     * Updates the brandingGuidelines with the specified value.
     * 
     * @param brandingGuidelines
     *            the brandingGuidelines to set.
     */
    public void setBrandingGuidelines(String brandingGuidelines) {
        this.brandingGuidelines = brandingGuidelines;
    }

    /**
     * Returns the dislikedSesignsWebsites.
     * 
     * @return the dislikedSesignsWebsites.
     */
    public String getDislikedSesignsWebsites() {
        return dislikedSesignsWebsites;
    }

    /**
     * Updates the dislikedSesignsWebsites with the specified value.
     * 
     * @param dislikedSesignsWebsites
     *            the dislikedSesignsWebsites to set.
     */
    public void setDislikedSesignsWebsites(String dislikedSesignsWebsites) {
        this.dislikedSesignsWebsites = dislikedSesignsWebsites;
    }

    /**
     * Returns the otherInstructions.
     * 
     * @return the otherInstructions.
     */
    public String getOtherInstructions() {
        return otherInstructions;
    }

    /**
     * Updates the otherInstructions with the specified value.
     * 
     * @param otherInstructions
     *            the otherInstructions to set.
     */
    public void setOtherInstructions(String otherInstructions) {
        this.otherInstructions = otherInstructions;
    }

    /**
     * Returns the winningCriteria.
     * 
     * @return the winningCriteria.
     */
    public String getWinningCriteria() {
        return winningCriteria;
    }

    /**
     * Updates the winningCriteria with the specified value.
     * 
     * @param winningCriteria
     *            the winningCriteria to set.
     */
    public void setWinningCriteria(String winningCriteria) {
        this.winningCriteria = winningCriteria;
    }
    
    /**
     * Compares this object with the passed object for equality. Only the id will be compared.
     *
     * @param obj
     *            the {@code Object} to compare to this one
     * @return true if this object is equal to the other, {@code false} if not
     */
    @Override
    public boolean equals(Object obj) {
        if (obj instanceof Contest) {
            return getContestGeneralInfoId() == ((ContestGeneralInfo) obj).getContestGeneralInfoId();
        }
        return false;
    }

    /**
     * Overrides {@code Object.hashCode()} to provide a hash code consistent with this class's
     * {@link #equals(Object)}} method.
     *
     * @return a hash code for this {@code Contest}
     */
    @Override
    public int hashCode() {
        return Helper.calculateHash(contestGeneralInfoId);
    }
}
